/**
 * Created by Toma on 2016/9/8.
 * 获取请求的内容
 */

var http = require('http');
http.createServer(function (request, response) {
  var body = [];

  console.log(request.method);
  console.log(request.headers);
  console.log(request.url);

  request.on('data', function (chunk) {
    body.push(chunk);
  });

  request.on('end', function () {
    body = Buffer.concat(body);
    console.log(body.toString());
  });

  response.writeHead(200, {'Content-Type': 'text/html;charset=utf-8'});
  response.end('响应成功了亲~(づ￣3￣)づ╭❤～\n');
}).listen(8585);